﻿using System.IO;
using System.Text.RegularExpressions;
using System.Xml;
using ThoughtWorks.CruiseControl.Core.Tasks;
using ThoughtWorks.CruiseControl.Core.Util;

namespace DevEnvXml
{
    public class DevenvXmlTaskResult : ProcessTaskResult
    {
        private static bool wasProjectStarted = false;
        static Regex projectStart = new Regex(@"^------.*?:.*?:\s+(\w+).*?:\s(\w+)\s(.*?)\s+------");
        static Regex allFinished = new Regex(@"^==========\s+(.*?):\s+(\d+).*?,\s+(\d+).*?,\s+(\d+).*?==========");

        public DevenvXmlTaskResult(ProcessResult result)
            : base(result)
        {
        }

        private static string TransformDevEnvOutput(string devenvOutput, string devenvError)
        {
            StringWriter stringWriter = new StringWriter();
            XmlWriter writer = new XmlTextWriter(stringWriter);
            writer.WriteStartElement("buildresults");
            WriteContent(writer, devenvOutput, false);
            WriteContent(writer, devenvError, true);
            writer.WriteEndElement();
            return stringWriter.ToString();
        }

        private static void WriteContent(XmlWriter writer, string messages, bool areErrors)
        {
            StringReader reader = new StringReader(messages);
            while (reader.Peek() >= 0)
            {
                string str = reader.ReadLine();
                if (!string.IsNullOrEmpty(str))
                {
                    if (!areErrors && IsProjectStart(str))
                    {
                        if (wasProjectStarted)
                        {
                            writer.WriteEndElement();
                            wasProjectStarted = false;
                        }
                        WriteProjectStart(writer, str);
                    }
                    else if (!areErrors && IsAllFinished(str))
                    {
                        //close last 'project' tag
                        if (wasProjectStarted)
                        {
                            writer.WriteEndElement();
                            wasProjectStarted = false;
                        }
                        WriteAllFinished(writer, str);
                    }
                    else
                    {
                        writer.WriteStartElement("message");
                        if (areErrors)
                        {
                            writer.WriteAttributeString("level", "error");
                        }
                        writer.WriteValue(StringUtil.RemoveNulls(str));
                        writer.WriteEndElement();
                    }
                }
            }
            if (wasProjectStarted)
            {
                writer.WriteEndElement();
                wasProjectStarted = false;
            }

        }

        private static bool IsProjectStart(string line)
        {
            bool ret = projectStart.IsMatch(line);
            return ret;
        }

        private static bool IsAllFinished(string line)
        {
            bool ret = allFinished.IsMatch(line);
            return ret;
        }


        private static void WriteProjectStart(XmlWriter writer, string line)
        {
            wasProjectStarted = true;

            writer.WriteStartElement("project");
            Match match = projectStart.Match(line);
            string name = "Unknown";
            string build = "Unknown";
            string platform = "Unknown";

            if (match.Success)
            {
                for (int i = 1; i < match.Groups.Count; i++)
                {
                    Group @group = match.Groups[i];
                    if (i == 1)
                    {
                        name = @group.Value;
                    }
                    else if (i == 2)
                    {
                        build = @group.Value;
                    } 
                    else if (i == 3)
                    {
                        platform = @group.Value;
                    }
                }
            }
            writer.WriteAttributeString("name", name);
            writer.WriteAttributeString("configuration", string.Format("{0} {1}", build, platform));
        }

        private static void WriteAllFinished(XmlWriter writer, string line)
        {
            writer.WriteStartElement("finished");
            Match match = allFinished.Match(line);

            string buildType = "Unknown";
            string succeeded = "Unknown";
            string failed = "Unknown";
            string skipped = "Unknown";

            if (match.Success)
            {
                for (int i = 1; i < match.Groups.Count; i++)
                {
                    Group @group = match.Groups[i];
                    if (i == 1)
                    {
                        buildType = @group.Value;
                    }
                    else if (i == 2)
                    {
                        succeeded = @group.Value;
                    }
                    else if (i == 3)
                    {
                        failed = @group.Value;
                    }
                    else if (i == 4)
                    {
                        skipped = @group.Value;
                    }
                }
            }
            writer.WriteAttributeString("buildtype", buildType);
            writer.WriteAttributeString("succeeded", succeeded);
            writer.WriteAttributeString("failed", failed);
            writer.WriteAttributeString("skipped", skipped);
            writer.WriteEndElement();
        }

        public override string Data
        {
            get
            {
                return TransformDevEnvOutput(result.StandardOutput, result.StandardError);
            }
        }
    }
}

/*
 ------ Rebuild All started: Project: DevEnvXml, Configuration: Debug Any CPU ------
c:\WINDOWS\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:..\Libs\NetReflector.dll /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /reference:..\Libs\ThoughtWorks.CruiseControl.Core.dll /reference:..\Libs\ThoughtWorks.CruiseControl.Remote.dll /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\DevEnvXml.dll /target:library DevenvXmlTaskResult.cs DevEnvBuilder.cs MsBuildTask.cs Properties\AssemblyInfo.cs
C:\user\Alex\projects\TestCruiseControl\DevEnvXml\DevenvXmlTaskResult.cs(49,46): Fehler CS0103: Der Name "basex" ist im aktuellen Kontext nicht vorhanden.

Compile complete -- 1 errors, 0 warnings
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
   <build date="2012-02-13 09:44:43" buildtime="00:07:15" error="true" buildcondition="ForceBuild"><![CDATA[------ Rebuild All started: Project: Cda.Oem, Configuration: Release-X86 x86 ------
C:\Windows\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /platform:x86 /errorreport:prompt /warn:4 /define:TRACE /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /debug:pdbonly /filealign:512 /optimize+ /out:obj\x86\Release-X86\Cda.Oem.dll /resource:obj\x86\Release-X86\Abc.Cda.Oem.Properties.Resources.resources /resource:obj\x86\Release-X86\Abc.Cda.Oem.Properties.Specific.resources /target:library Properties\AssemblyInfo.cs Properties\Resources.Designer.cs Properties\Settings.Designer.cs Properties\Specific.Designer.cs

Compile complete -- 0 errors, 0 warnings
Cda.Oem -> C:\Projects\Abc\Oem-Varianten\QUNDIS.Oem\bin\Release\Cda.Oem.dll
rem --copy dll back to know name folder
md "C:\Projects\Abc\Oem-Varianten\QUNDIS.Oem\bin\output\"
rem -- pay attention that current folder is $OutDir
copy /B /Y "Cda.Oem.dll" "C:\Projects\Abc\Oem-Varianten\QUNDIS.Oem\bin\output"
        1 File copied.
------ Rebuild All started: Project: Abc.Api, Configuration: Release-X86 x86 ------
C:\Windows\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /platform:x86 /errorreport:prompt /define:TRACE /reference:"C:\Program Files (x86)\NUnit 2.5.7\bin\net-2.0\framework\nunit.framework.dll" /reference:C:\Projects\Abc\Oem-Varianten\QUNDIS.Oem\bin\Release\Cda.Oem.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Runtime.Serialization.Formatters.Soap.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /debug:pdbonly /filealign:512 /optimize+ /out:obj\x86\Release-X86\Abc.Api.dll /resource:obj\x86\Release-X86\Abc.Api.Help.HelpId.resources /resource:obj\x86\Release-X86\Abc.Api.MultiLang.resources /target:library Common\Attributes\CodeBaseAttribute.cs Common\Attributes\CodeChangeAttribute.cs Common\Attributes\CodeCreateAttribute.cs Common\Attributes\CodeReviewAttribute.cs Common\Information\AssemblyInfo.cs Common\Information\ComputerInfo.cs Common\Information\UserInfo.cs Common\Plugin\Plugin.cs Common\Communication\Interfaces\ICommunication.cs Common\Communication\Interfaces\ICommunicationData.cs Common\Communication\Interfaces\ICommunicationDataStore.cs Exception\BusinessObjects\BusinessObject.cs Exception\Interfaces\IException.cs Exception\BusinessObjects\DatabaseInfo.cs Exception\BusinessObjects\EffectTextPlaceholder.cs Exception\BusinessObjects\ExceptionLog.cs Exception\BusinessObjects\MessageTextPlaceholder.cs Exception\BusinessObjects\StackTraceInfo.cs Exception\ExceptionCategory.cs Exception\ExceptionSeverity.cs Exception\Interfaces\IExceptionData.cs Exception\Interfaces\IExceptionDataStore.cs Export\BusinessObjects\Base\ExportData.cs Export\Interfaces\IExport.cs Export\Interfaces\IPluginExport.cs Device\Interfaces\IDevice.cs Device\Interfaces\IDeviceData.cs Device\Interfaces\IDeviceDataStore.cs Protocol\Interfaces\IProtocol.cs Language\Interfaces\ILanguage.cs Settings\Interfaces\ISettings.cs Settings\Interfaces\ISettingsData.cs Settings\Interfaces\ISettingsDataStore.cs Security\Interfaces\ISecurity.cs Security\Interfaces\ISecurityData.cs Security\Interfaces\ISecurityDataStore.cs Exception\BusinessObjects\PlaceHolder.cs Exception\BusinessObjects\Suggestion.cs Exception\Objects\AbcBaseException.cs Properties\AssemblyInfo.cs ISingletonInit.cs TSingleton.cs Commands\HelpBaseCommand.cs Commands\CommandWithOkResult.cs Commands\CommandWithWindow.cs Commands\MenuIds.cs Common\Attributes\CompareIgnoreAttribute.cs Common\Attributes\CompareWithAttribute.cs Common\Attributes\DeleteHelperAttribute.cs Common\Attributes\UpdateValueCheckerAttribute.cs Common\Commands\ClearDeviceErrorsCommand.cs Common\Commands\CommandRemoteDevice.cs Common\Commands\InitializeDeviceCommand.cs Common\Commands\WriteDefaultSettingsCommand.cs Common\Events\CommunicationSettingsEventArgs.cs Common\Events\DataVisualizerEventArgs.cs Common\Events\DeviceListDataEventArgs.cs Common\Attributes\ErrorTextAttribute.cs Common\Events\ExceptionDataEventArgs.cs Common\Attributes\FormatValueAttribute.cs Common\Events\NewDeviceCommandEventArgs.cs Common\Attributes\PluginAttribute.cs Common\Attributes\TranslateEnumAttribute.cs Common\Attributes\UseTextColorAttribute.cs Common\Attributes\UseWriteStateAttribute.cs Common\Attributes\ValueCheckerAttribute.cs Common\Commands\WriteDataCommand.cs Common\Commands\EditDataCommandRemote.cs Common\Commands\StopExecutionCommand.cs Common\Commands\MdiChildClosedNotify.cs Common\Commands\NotifyCommand.cs Common\Commands\StartReadingCommand.cs Common\Commands\ActionFinishedNotify.cs Common\Commands\CommandRemote.cs Common\Commands\UpdateContext.cs Common\Commands\CommandsContainer.cs Common\Commands\CommandEventArgs.cs Common\Commands\ECommandId.cs Common\Commands\IWaitCursor.cs Common\Commands\ICommandUpdateState.cs Common\Commands\Command.cs Common\Commands\IStateManager.cs Common\Communication\BusinessObjects\Device.cs Common\Communication\BusinessObjects\DeviceCommunicationSettings.cs Common\Communication\BusinessObjects\HardwareCommunication.cs Common\Communication\BusinessObjects\Setting.cs Common\Events\ProgramSettingsEventArgs.cs Common\Events\TextMessageEventArgs.cs Data\CalculateStartStopTime.cs Common\Communication\CommunicationChannel.cs Common\Communication\CommunicationChannelList.cs Common\Communication\CommunicationSettings.cs Common\Communication\CommunicationType.cs Common\Communication\CommunicationTypeList.cs Common\Communication\ComPort.cs Common\Communication\ComportCommunicationBase.cs Common\Communication\ComPortSettingsBase.cs Common\Communication\Interfaces\ICommunicationDevice.cs Common\Communication\Interfaces\IConnection.cs Common\Communication\Interfaces\IAsyncRead.cs Common\Communication\Interfaces\IBufferTransformer.cs Common\Communication\Interfaces\ICommunicationAsync.cs Common\Communication\Interfaces\IProtocolAsync.cs Common\Communication\Interfaces\IProtocolBase.cs Common\Communication\ProtocolAsyncBase.cs Common\Events\EventManager.cs Common\Events\PluginEvent.cs Data\Converters\ByteArrayConverter.cs Data\Converters\DataItemContainterIntegerConverter.cs Data\Converters\DataItemValidationContext.cs Data\Converters\HexInteger16Converter.cs Data\Converters\HexInteger32Converter.cs Data\Converters\IntegerConverterDropDown.cs Data\Converters\ReadOnlyDurationFromIntegerConverter.cs Data\Converters\TemperatureDoubleConverter.cs Data\Converters\TranslatedEnumValue.cs Data\Converters\UserConverter.cs Data\Converters\UserPasswordConverter.cs Data\DataException\DataException.cs Data\DataException\EDataException.cs Data\DataException\ExceptionNotEnoughtSymbolsForValue.cs Data\DataException\ExceptionValueBiggerAsMaximum.cs Data\DataException\ExceptionValueIsMandatory.cs Data\DataException\ExceptionValueSmallerAsMinimum.cs Data\DataItemActualCutoffDateBase.cs Data\DataItemDependencies.cs Data\DataItemIdCollection.cs Data\DataItems\AlbatrosId.cs Data\DataItems\DataItemBitSummerWinter.cs Data\DataItems\DataItemByteArray.cs Data\DataItems\DataItemCutOffDateBase.cs Data\DataItems\DataItemBitEnum.cs Data\DataItems\DataItemBitOnOff.cs Data\DataItems\DataItemContainterInteger.cs Data\DataItems\DataItemEnum.cs Data\DataItems\DataItemInvalid.cs Data\DataItems\DataItemsSetIdentEventArgs.cs Data\DataItems\DataItemsSetWEventArgs.cs Data\DataItems\DataItemsSetWpEventArgs.cs Data\DataItems\DataItemTemperatureDoubleConvertion.cs Data\DataItems\DataItemTemperatureInteger.cs Data\DataItems\DataItemUserIdBase.cs Data\DataItems\DataItemUserIdR.cs Data\DataItems\DataItemUserIdW.cs Data\DataItems\DbString.cs Data\DataItems\IDataItemValueGet.cs Data\DataItems\IMeasureUnitGet.cs Data\DataItems\IMeasureUnitSet.cs Data\Device\DataItemAccessNumberBase.cs Data\Device\DataItemAccessNumberIR.cs Data\Device\DataItemAccessNumberR.cs Data\Device\DataItemDeviceTypeR.cs Data\Device\DataItemFabricationNumberR.cs Data\Device\DataItemIdentificationNumberR.cs Data\Device\DataItemManufacturerR.cs Data\Device\DataItemMediumBase.cs Data\Device\DataItemMediumIR.cs Data\Device\DataItemMediumR.cs Data\Device\DataItemModelVersionBase.cs Data\Device\DataItemModelVersionR.cs Data\Device\DataItemSignatureR.cs Data\Device\DataItemSoftwareVersionR.cs Data\Device\DeviceDataItemsSet.cs Data\Device\IDeviceIdentification.cs Data\ECategory.cs Data\EMaskType.cs Data\IDataItemBit.cs Data\MeterValueMonth.cs Data\Converters\MediumConverter.cs Data\Converters\StringConverter.cs Data\TValidValue.cs Debugger.cs Device\BusinessObjects\BusinessObject.cs Device\BusinessObjects\BusinessRules\BusinessRule.cs Device\BusinessObjects\BusinessRules\ValidateId.cs Device\BusinessObjects\BusinessRules\ValidateLength.cs Device\BusinessObjects\BusinessRules\ValidateRegex.cs Device\BusinessObjects\BusinessRules\ValidateRequired.cs Device\BusinessObjects\Categories.cs Device\BusinessObjects\Dependency.cs Device\BusinessObjects\Devices.cs Device\BusinessObjects\RawData.cs Device\BusinessObjects\Udfs.cs Device\Interfaces\IDeviceDatabase.cs Exception\Objects\AbcConverterException.cs Exception\Objects\AbcCreateDatabaseFailedException.cs Exception\Objects\AbcDeleteDatabaseFailedException.cs Exception\Objects\AbcBcdSizeTooSmallException.cs Exception\Objects\AbcNotAppropriateBufferLengthException.cs Exception\Objects\AbcLoadDeviceSettingsException.cs Exception\Objects\AbcExponentBiggerNullException.cs Exception\Objects\AbcExponentNotInRange09Exception.cs Exception\Objects\AbcStreamMustSupportSeekException.cs Exception\Objects\AbcNoDuplicateConnectionException.cs Exception\Objects\AbcUnhandledException.cs Exception\Objects\AbcCommunicationNotSetException.cs Exception\Objects\AbcOpenDatabaseFailedException.cs Exception\Objects\AbcRenameDatabaseFailedException.cs Exception\Objects\AbcSwitchOnDefaultFailedException.cs Exception\Objects\AbcWrongDatabaseException.cs Exception\Temp\AbcExceptionShow.cs Export\BusinessObjects\Common\DataFormatFunctions.cs Export\BusinessObjects\Common\ExportDataEnums.cs Export\BusinessObjects\XML\Datapoint.cs Export\BusinessObjects\Rep\RepData.cs Export\BusinessObjects\Rep\RepDeviceData.cs Export\BusinessObjects\XML\XMLData.cs Export\BusinessObjects\XML\XMLDeviceData.cs Help\HelpId.Designer.cs Help\HelpManager.cs Language\Businessobject\AbcLanguage.cs Oem\IOemDesign.cs Oem\ISupportAddress.cs Oem\OemDesign.cs Oem\OemSettings.cs Oem\SupportAddress.cs Plugins\IPluginOld.cs Core\Cloneable.cs Core\CommonHandlers.cs Core\ErrorEventArgs.cs Core\EventArgsException.cs Core\EventArgsInt.cs Core\EventArgsIntDescription.cs Core\EventArgsObj.cs Core\IdentObject.cs Core\AbcImageMap.cs Core\INamedListWithType.cs Core\ISettingsUpdater.cs Core\XmlSerialization.cs Data\BytesDataReadyEventArgs.cs Data\Convertor.cs Data\DataDictionary.cs Data\DataExchange.cs Data\DataItems\DataItemDeviceDateWConsole.cs Data\DataItems\DataItem.cs Data\DataItemCategory.cs Data\DataItemCollection.cs Data\DataItemIds.cs Data\DataItemsSet.cs Data\DataItems\DataItemDateTime.cs Data\DataItems\DataItemDeviceDateBase.cs Data\DataItems\DataItemDouble.cs Data\DataItems\DataItemHCA.cs Data\DataItems\DataItemInteger.cs Data\DataItems\DataItemsSetREventArgs.cs Data\DataItems\DataItemString.cs Data\DataItems\DataItemValue.cs Data\DataItems\EDataItem.cs Data\DataReadyEventArgs.cs Data\DataValueDictionary.cs Data\DataValueTypeDictionary.cs Data\DescriptionItem.cs Data\IChangeableData.cs Data\IDataExchange.cs Data\IDataValidator.cs Data\AbcDateTime.cs Data\IListDescription.cs Data\MeterValue.cs Data\Metric.cs Data\ObjectDataReadyEventArgs.cs Data\PropertyGrid\DataDictionaryItemPropertyDescriptor.cs Data\PropertyGrid\DataItemCollectionConverter.cs Data\Converters\DataItemDateTimeConverter.cs Data\PropertyGrid\DataItemPropertyDescriptor.cs Data\PropertyGrid\DataValueDictionaryConverter.cs Data\PropertyGrid\DataValueTypeDictionaryConverter.cs Data\Converters\DateTimeValueConverter.cs Data\Converters\DialogDataItemsConverter.cs Data\Converters\DoubleValueConverter.cs Data\Converters\EnumerationConverter.cs Data\Converters\HCAValueConverter.cs Data\Converters\IntegerConverter.cs Data\StringDataReadyEventArgs.cs Data\TimeOfDay.cs Data\TypeConverterHelper.cs Exception\DeveloperException.cs Exception\Objects\AbcComponentsLoadFailedException.cs Exception\Objects\AbcDatabaseFailedToSaveException.cs Exception\Objects\AbcExportExecuteFailedException.cs Exception\Temp\AbcExceptionDisplay.cs Exception\Temp\AbcExceptionErrCode.cs Exception\Temp\AbcExceptions.cs Exception\Temp\IErrorDescription.cs Export\BusinessObjects\ExportFormat.cs Export\Objects\ExportPluginFunctions.cs IArchitecture.cs Logging\ErrorProtocolEventArgs.cs Logging\FileProtocol.cs Logging\Protocol.cs Logging\ProtocolCollection.cs Logging\ProtocolEventArgs.cs Logging\ProtocolItem.cs Logging\Tracker.cs MlString.cs Plugins\ClientStateManager.cs Plugins\DeviceComponent.cs Plugins\DeviceSession.cs Plugins\DeviceSettings.cs Plugins\EPluginType.cs Plugins\IDeviceComponent.cs Plugins\ImageTypes.cs Plugins\IPlugin.cs Plugins\PluginIds.cs Plugins\PluginSettings.cs Security\BusinessObjects\BusinessObject.cs Security\BusinessObjects\BusinessRules\BusinessRule.cs Security\BusinessObjects\BusinessRules\ValidateId.cs Security\BusinessObjects\BusinessRules\ValidateLength.cs Security\BusinessObjects\BusinessRules\ValidateRegex.cs Security\BusinessObjects\BusinessRules\ValidateRequired.cs Security\BusinessObjects\DatabaseInfo.cs Security\BusinessObjects\Permission.cs Security\BusinessObjects\PermissionAttributs.cs Security\BusinessObjects\PermissionGroup.cs Security\BusinessObjects\RegisteredTo.cs Security\BusinessObjects\Role.cs Security\BusinessObjects\RolesPermissions.cs Security\BusinessObjects\Signature.cs Security\BusinessObjects\User.cs Security\BusinessObjects\UsersRoles.cs Security\MenuPermissionToken.cs Security\PermissionToken.cs Security\PermissionCollection.cs Settings\BusinessObjects\ProgramSettings.cs Settings\BusinessObjects\ProgramSettingsDb.cs Settings\FolderManager.cs Threading\ActionDataDefinitions.cs Threading\ActionDefinitions.cs Threading\ActionEventArgs.cs Threading\ActionNotification.cs Threading\Condition.cs Threading\Conditions.cs Threading\DefaultExitCondition.cs Threading\ExecutionAsync.cs Threading\ExecutionAsyncQueue.cs Threading\ExecutionCompletedEventArgs.cs Threading\IActionNotification.cs Threading\IExecutionAsync.cs Tools\AbcDateTimeFormatHelper.cs Tools\EnumTranslation.cs Tools\FunctionTimeTracer.cs Tools\FunctionTracerBase.cs Tools\HiResTimer.cs Tools\IEnumTranslation.cs Tools\LanguageHelper.cs Tools\TEnumObject.cs Tools\TEnumConvertor.cs Tools\TEnumTranslation.cs Tools\TimeTracer.cs Tools\Utils.cs TypeChecker.cs
C:\Projects\Abc\Framework\Abc.Api\Data\DataItems\DataItemValue.cs(27,27): warning CS0659: 'Abc.Api.Data.DataItems.DataItemValue' overrides Object.Equals(object o) but does not override Object.GetHashCode()
C:\Projects\Abc\Framework\Abc.Api\Data\Converters\ByteArrayConverter.cs(188,34): warning CS0114: 'Abc.Api.Data.Converters.ByteArrayAsStringConverter.GetValue(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, object)' hides inherited member 'Abc.Api.Data.Converters.ByteArrayConverter.GetValue(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, object)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.
C:\Projects\Abc\Framework\Abc.Api\Data\Converters\ByteArrayConverter.cs(100,34): (Related location)
C:\Projects\Abc\Framework\Abc.Api\Core\Cloneable.cs(137,33): warning CS0219: The variable 'a' is assigned but its value is never used
C:\Projects\Abc\Framework\Abc.Api\Data\DataItems\DataItemValue.cs(39,26): warning CS3005: Identifier 'Abc.Api.Data.DataItems.DataItemValue.measureUnit' differing only in case is not CLS-compliant
C:\Projects\Abc\Framework\Abc.Api\Data\DataItems\IMeasureUnitGet.cs(9,16): (Related location)
C:\Projects\Abc\Framework\Abc.Api\Common\Communication\ComportCommunicationBase.cs(581,41): warning CS0168: The variable 'ex' is declared but never used
C:\Projects\Abc\Framework\Abc.Api\Common\Communication\ComportCommunicationBase.cs(777,37): warning CS0168: The variable 'ex' is declared but never used
C:\Projects\Abc\Framework\Abc.Api\Data\DataItems\DataItemDateTime.cs(39,20): warning CS0219: The variable 'dateTimeFormat' is assigned but its value is never used
C:\Projects\Abc\Framework\Abc.Api\Data\DataItems\AlbatrosId.cs(54,17): warning CS3008: Identifier 'Abc.Api.Data.DataItems.AlbatrosId.Variants.EAlgorithm._202' is not CLS-compliant
C:\Projects\Abc\Framework\Abc.Api\Common\Attributes\UseTextColorAttribute.cs(13,18): warning CS3015: 'Abc.Api.Common.Attributes.UseTextColorAttribute' has no accessible constructors which use only CLS-compliant types
C:\Projects\Abc\Framework\Abc.Api\Data\Converters\EnumerationConverter.cs(213,23): warning CS0219: The variable 'retArray' is assigned but its value is never used
C:\Projects\Abc\Framework\Abc.Api\Data\Converters\IntegerConverter.cs(155,20): warning CS0168: The variable 'exception' is declared but never used
C:\Projects\Abc\Framework\Abc.Api\Data\Converters\ReadOnlyDurationFromIntegerConverter.cs(88,29): warning CS0168: The variable 'displayHours' is declared but never used
C:\Projects\Abc\Framework\Abc.Api\Tools\Utils.cs(83,17): warning CS3009: 'Abc.Api.Tools.HResult': base type 'uint' is not CLS-compliant
c:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll: (Related file)
C:\Projects\Abc\Framework\Abc.Api\Tools\Utils.cs(700,23): warning CS0675: Bitwise-or operator used on a sign-extended operand; consider casting to a smaller unsigned type first
C:\Projects\Abc\Framework\Abc.Api\Tools\Utils.cs(700,23): warning CS0675: Bitwise-or operator used on a sign-extended operand; consider casting to a smaller unsigned type first
C:\Projects\Abc\Framework\Abc.Api\Tools\Utils.cs(797,50): warning CS3001: Argument type 'uint' is not CLS-compliant
C:\Projects\Abc\Framework\Abc.Api\Data\Convertor.cs(749,30): warning CS3002: Return type of 'Abc.Api.Data.Convertor.EncodeUser(string)' is not CLS-compliant
C:\Projects\Abc\Framework\Abc.Api\Data\Convertor.cs(785,41): warning CS3001: Argument type 'ushort' is not CLS-compliant
C:\Projects\Abc\Framework\Abc.Api\Data\Convertor.cs(815,30): warning CS3002: Return type of 'Abc.Api.Data.Convertor.EncryptPass(ushort, byte, int)' is not CLS-compliant
C:\Projects\Abc\Framework\Abc.Api\Data\Convertor.cs(815,42): warning CS3001: Argument type 'ushort' is not CLS-compliant
C:\Projects\Abc\Framework\Abc.Api\Data\Convertor.cs(835,30): warning CS3002: Return type of 'Abc.Api.Data.Convertor.GetDevicePassword2(string, byte, int)' is not CLS-compliant
C:\Projects\Abc\Framework\Abc.Api\Data\Convertor.cs(1000,135): warning CS3001: Argument type 'uint' is not CLS-compliant
C:\Projects\Abc\Framework\Abc.Api\Data\Convertor.cs(1252,18): warning CS0219: The variable 'valid' is assigned but its value is never used
C:\Projects\Abc\Framework\Abc.Api\Data\Convertor.cs(1499,38): warning CS0168: The variable 'ex' is declared but never used
C:\Projects\Abc\Framework\Abc.Api\Data\PropertyGrid\DataValueTypeDictionaryConverter.cs(56,29): warning CS0219: The variable 'a' is assigned but its value is never used
C:\Projects\Abc\Framework\Abc.Api\Export\BusinessObjects\XML\Datapoint.cs(110,71): warning CS3001: Argument type 'ushort' is not CLS-compliant
C:\Projects\Abc\Framework\Abc.Api\Export\BusinessObjects\XML\Datapoint.cs(110,87): warning CS3001: Argument type 'ushort' is not CLS-compliant
C:\Projects\Abc\Framework\Abc.Api\Export\BusinessObjects\XML\Datapoint.cs(67,17): warning CS3003: Type of 'Abc.Api.Export.BusinessObjects.XML.Datapoint.Subunit' is not CLS-compliant
C:\Projects\Abc\Framework\Abc.Api\Export\BusinessObjects\XML\Datapoint.cs(82,17): warning CS3003: Type of 'Abc.Api.Export.BusinessObjects.XML.Datapoint.Tariff' is not CLS-compliant
C:\Projects\Abc\Framework\Abc.Api\Data\Device\DeviceDataItemsSet.cs(60,25): warning CS0219: The variable 'a' is assigned but its value is never used
C:\Projects\Abc\Framework\Abc.Api\Data\Converters\DoubleValueConverter.cs(158,21): warning CS0219: The variable 'a' is assigned but its value is never used
C:\Projects\Abc\Framework\Abc.Api\Core\XmlSerialization.cs(59,45): warning CS0168: The variable 'ex' is declared but never used
C:\Projects\Abc\Framework\Abc.Api\Data\MeterValueMonth.cs(21,100): warning CS3001: Argument type 'uint' is not CLS-compliant
C:\Projects\Abc\Framework\Abc.Api\Data\DataReadyEventArgs.cs(16,27): warning CS0169: The field 'Abc.Api.Data.DataReadyEventArgs.dataType' is never used

Compile complete -- 0 errors, 34 warnings
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\AL.exe /culture:cs /out:obj\x86\Release-X86\cs\Abc.Api.resources.dll /platform:x86 /template:obj\x86\Release-X86\Abc.Api.dll /embed:obj\x86\Release-X86\Abc.Api.MultiLang.cs.resources
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\AL.exe /culture:de /out:obj\x86\Release-X86\de\Abc.Api.resources.dll /platform:x86 /template:obj\x86\Release-X86\Abc.Api.dll /embed:obj\x86\Release-X86\Abc.Api.MultiLang.de.resources
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\AL.exe /culture:en /out:obj\x86\Release-X86\en\Abc.Api.resources.dll /platform:x86 /template:obj\x86\Release-X86\Abc.Api.dll /embed:obj\x86\Release-X86\Abc.Api.MultiLang.en.resources
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\AL.exe /culture:fr /out:obj\x86\Release-X86\fr\Abc.Api.resources.dll /platform:x86 /template:obj\x86\Release-X86\Abc.Api.dll /embed:obj\x86\Release-X86\Abc.Api.MultiLang.fr.resources
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\AL.exe /culture:it /out:obj\x86\Release-X86\it\Abc.Api.resources.dll /platform:x86 /template:obj\x86\Release-X86\Abc.Api.dll /embed:obj\x86\Release-X86\Abc.Api.MultiLang.it.resources
Abc.Api -> C:\Projects\Abc\Framework\Abc.Api\bin\Release\Abc.Api.dll
------ Rebuild All started: Project: Abc.Api.Mbus, Configuration: Release-X86 x86 ------
 
 */
